找传奇、传世资源到传世资源站!
Java 正文

kmeans算法java 工程源码 下载后可直接解压运行

  • 资源分类:Java
  • 发 布 人:房东的猫
  • 文件大小:2939
  • 文件格式:.zip
  • 浏览次数:20
  • 下载次数: 0
  • 发布时间:9月5日

  • 标签: 源码例子
8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

Java kmeans基础算法kmeans begins
迭代次数=5
kmeans running time=0ms
kmeans ends

print:cluster[0][0]={5.0,6.0,7.0,6.0,7.0,0.0,0.0}
print:cluster[0][1]={8.0,9.0,10.0,6.0,7.0,0.0,0.0}
print:cluster[0][2]={3.0,9.0,6.0,6.0,7.0,0.0,0.0}
print:cluster[0][3]={5.0,9.0,14.0,6.0,7.0,0.0,0.0}
===================================
print:cluster[1][0]={3.0,3.0,3.0,6.0,7.0,3.0,14.0}
===================================
print:cluster[2][0]={1.0,2.0,3.0,4.0,5.0,11.0,45.0}
print:cluster[2][1]={3.0,4.0,5.0,6.0,7.0,12.0,37.0}
===================================
print:cluster[3][0]={4.0,5.0,6.0,6.0,7.0,0.0,0.0}
print:cluster[3][1]={6.0,4.0,2.0,6.0,7.0,0.0,0.0}
print:cluster[3][2]={4.0,2.0,0.0,6.0,7.0,0.0,0.0}
print:cluster[3][3]={1.0,1.0,1.0,6.0,7.0,0.0,0.0}
print:cluster[3][4]={2.0,1.0,0.0,6.0,7.0,0.0,0.0}
print:cluster[3][5]={2.0,2.0,2.0,6.0,7.0,0.0,0.0}
===================================
/** * 求两点误差平方的方法 * * @param element * 点1 * @param center * 点2 * @return 误差平方 */ private float errorSquare(float[] element, float[] center) { float errSquare=0.0f; for(int i=0;i<element.length;i ){ errSquare =Math.pow((element[i] - center[i]),2); } return errSquare;}

.
├── Kmeans.java
└── 找例子网_Kmeans.zip

0 directories, 2 files

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复